package com.voice.core.connection;

import com.voice.core.connection.callback.StreamListener;

import java.io.Closeable;
import java.util.Optional;

public interface Connection extends ConnectionReader, ConnectionWriter, Closeable {

    void setConnectionListener(ConnectionListener connectionListener);

    void removeConnectListener();

    void removeStreamListener(int streamId);

    void onConnectionClosed();

    void setStatus(ConnectionStatus var1);

    ConnectionStatus getStatus();

    void setDefaultStreamListener(StreamListener listener);

    Optional<StreamListener> defaultStreamListener();

    void close();

}
